<?php
// $Id: front.php 406 2012-05-29 05:30:34Z tomqin@gmail.com $

class Action_Front extends Action{
    public $user = null;

    function showCache($cachename, $func, $time = 86400, $force = false){
        if($force)
            $html = '';
        else
            $html = Cache::get($cachename, $time);

        if(!$html){
            ob_start();
            call_user_func($func);

            $html = ob_get_contents();
            $html = clean_html($html);
            ob_end_clean();
            Cache::set($cachename, $html);
        }
        echo $html;
    }
}
